]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Tear down the gjs context before the mutter context
authorJonas Ådahl <jadahl@gmail.com>
Wed, 17 Aug 2022 14:32:52 +0000 (16:32 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 25 Nov 2022 21:09:37 +0000 (22:09 +0100)
Tearing down gjs means that we won't have any dangling references kept
alive by GC or otherwise alive Javascript objects, when we finally tear
down the mutter context. This allows for a clean shutdown of GNOME
Shell.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>

src/main.c

index 468e588493e08300787abd5d54734a9f518be675..269fe56c921bcb4ead2e31ea4825e51dd958b790 100644 (file)
@@ -587,14 +587,14 @@ main (int argc, char **argv)
 
   g_message ("Shutting down GNOME Shell");
   _shell_global_notify_shutdown (shell_global_get ());
-
-  meta_context_destroy (g_steal_pointer (&context));
-
   shell_profiler_shutdown ();
 
-  g_debug ("Doing final cleanup");
+  g_debug ("Tearing down the gjs context");
   _shell_global_destroy_gjs_context (shell_global_get ());
   g_object_unref (shell_global_get ());
 
+  g_debug ("Tearing down the mutter context");
+  meta_context_destroy (g_steal_pointer (&context));
+
   return ecode;
 }